﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace legends
{
    public partial class ItemEditorForm : Form
    {
        private GameConstants gameConstants;
        public ItemEditorForm(GameConstants gameCon)
        {
            InitializeComponent();
            this.gameConstants = gameCon;   //loading gameConstants from previous Form, needed for setting resolution     
            //
            // sizing and positioning of components
            // 
            this.ClientSize = new System.Drawing.Size(gameConstants.getResWidth(), gameConstants.getResHeight());
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.ControlBox = false;
        }

        //
        // Opens WorldEditorForm, closes this form
        //
        private void WorldEditorButton_Click(object sender, EventArgs e)
        {
            WorldEditForm worldEditorForm = new WorldEditForm(gameConstants);

            worldEditorForm.Show();
            this.Visible = false;
        }
     
        //
        // Opens TileEditorForm, closes this form
        //
        private void TileEditorButton_Click(object sender, EventArgs e)
        {
            TileEditorForm tileEditorForm = new TileEditorForm(gameConstants);

            tileEditorForm.Show();
            this.Visible = false;
        }

        //
        // Closes application
        //
        private void ExitButton_Click(object sender, EventArgs e)
        {
            this.Dispose();
            Application.Exit();
        }


    }
}
